/**
 * 
 */
package com.effectiv.panchoo.config;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration.Dynamic;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * @author Dhrubo
 *
 */
public class DispatcherServletInitializer extends
		AbstractAnnotationConfigDispatcherServletInitializer {

	@Override
    protected Class<?>[] getRootConfigClasses() {
            return new Class<?>[] { WebSecurityConfig.class, HazelcastConfig.class };
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
            return new Class<?>[] { WebConfig.class, WebSocketConfig.class };
    }

    @Override
    protected String[] getServletMappings() {
            return new String[] { "/" };
    }

    @Override
    protected void customizeRegistration(Dynamic registration) {
            registration.setInitParameter("dispatchOptionsRequest", "true");
            registration.setAsyncSupported(true);
    }

    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
            super.onStartup(servletContext);
    }



}
